package com.woniu.market_stall.mapper;

import com.woniu.market_stall.entity.Market;
import com.woniu.market_stall.vo.MarketVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MarketMapper {
    int deleteByPrimaryKey(Integer marketId);

    int insert(Market record);

    Market selectByPrimaryKey(Integer marketId);

    List<Market> selectAll();

    int updateByPrimaryKey(Market record);
//=================================================================================================================
    List<MarketVo> selectMarketByCons(@Param(value = "mname") String mname, @Param(value = "status") String status);

    void deleteMarketById(int id);

    void insertMarket(MarketVo marketVo);

    void updateMarketById(MarketVo marketVo);

    @Select("select status from market where market_id = #{id}")
    int selectStatusById(int id);
}